package com.app.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Scope;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.app.biz.AppCategoryBiz;
import com.app.biz.BackendUserBiz;
import com.app.dao.BackendUserDao;
import com.app.entity.AppCategory;
import com.app.entity.AppInfo;
import com.app.entity.BackendUser;


@Service("backendUserBiz")
public class BackendUserBizImpl implements BackendUserBiz{
    
	@Autowired
	private BackendUserDao backendUserDao;
	
	@Transactional(propagation=Propagation.REQUIRED)
	public BackendUser checkBackUserLogin(String userName, String userPassword) {
		// TODO Auto-generated method stub
		return backendUserDao.checkBackUserLogin(userName, userPassword);
	}
	 public static void main(String[] args) {
			ApplicationContext context=new ClassPathXmlApplicationContext("beans.xml");
			BackendUserBiz movieBiz=(BackendUserBiz) context.getBean("backendUserBiz");
//			int[] parendId={1,2};
//			List<AppCategory> list1=movieBiz.getAppCategoryByParendId(parendId);
			BackendUser i=movieBiz.checkBackUserLogin("系统管理员", "123456");
		
			System.out.println(i.getUserName());
			
		
    }
	
	

}
